package com.yzh.springboot_rbac.mapper;

import com.yzh.springboot_rbac.entity.DictType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 此接口对应字典管理菜单
 */
@Mapper
public interface DictTypeMapper {
    /*1，新增字典类型*/
    int insertDictType(DictType dictType);

    /*2. 查询所有字典类型*/
     List<DictType> selectDictTypeAll();


     /*3.根据条件查询字典类型*/
     List<DictType> selectDictTypeByConditon(DictType dictType);


     /*4.修改字典类型*/
     int updateDictType(DictType dictType);

     /*辅助方法*/
     DictType selectDictTypeById(Long dictId);

     /*5.批量删除字典类型信息
     * 辅助方法：
     *  - deleteDictTypeById
     *  - countDictDataByType(String dictType)
     *  - 为了避免不必要的多表联查，写在字典数据mapper层中，写在mapper中让字典实体类的service调用即可
     * */
    int deleteDictTypeById(Long dictId);
    int deleteDictTypeByIds(Long[] dictIds);


}
